---
title: ChatMoonshot
---

LangChain.js supports the Moonshot AI family of models.

https://platform.moonshot.cn/docs/intro

## Setup

You'll need to sign up for an Moonshot API key and set it as an environment variable named `MOONSHOT_API_KEY`

https://platform.moonshot.cn/console

You'll also need to install the following dependencies:

import IntegrationInstallTooltip from '/snippets/javascript-integrations/integration-install-tooltip.mdx';

<IntegrationInstallTooltip/>

```bash npm
npm install @langchain/community @langchain/core
```

## Usage

Here's an example:

import IntegrationMoonshot from "/snippets/javascript-integrations/examples/models/chat/integration_moonshot.mdx";

<IntegrationMoonshot />

## Related

- Chat model [conceptual guide](/oss/langchain/models)
- Chat model [how-to guides](/oss/langchain/models)
